<!DOCTYPE html>
<body>
<script>
  (async () => {
      const params = new URL(location.href).searchParams;
      const frame_url = params.get('frame');
      const link = document.createElement('link');
      link.rel = 'webbundle';
      link.href = params.get('wbn');
      link.resources = frame_url;
      document.body.appendChild(link);
      const message_promise = new Promise((resolve) => {
	  window.addEventListener('message', (e) => {
              resolve(e.data);
	  });
      });
      const iframe = document.createElement('iframe');
      iframe.src = frame_url;
      document.body.appendChild(iframe);
      await message_promise;
      document.title = 'OK';
  })();
</script>
</body>
